package com.cxb.springboot.convert;

import com.cxb.springboot.domin.BidataBeneficiaryRequest;
import com.cxb.springboot.domin.EnterpriseRequest;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

/**
 * @Classname BeneficiaryRequestMapper
 * @Date 2023/5/6 20:19
 * @Created by Administrator
 * @Description TODO
 */
@Mapper
public interface BeneficiaryRequestMapper {

    BeneficiaryRequestMapper MAPPER = Mappers.getMapper(BeneficiaryRequestMapper.class);

    @Mappings({
            @Mapping(source = "enterpriseId",   target = "entid"),
            @Mapping(source = "creditCode",     target = "creditcode"),
            @Mapping(source = "registerNo",     target = "regno"),
            @Mapping(source = "enterpriseName", target = "name")
    })
    BidataBeneficiaryRequest toTarget(EnterpriseRequest source);

}
